package com.ken.quartz.spring;

import org.springframework.stereotype.Component;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * Created by renchongyu on 2018/11/24.
 */
@Component("myBean")
public class MyBean {

    public void printMessage(){
        Date date = new Date();
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        System.out.println("MyBean date = "+sdf.format(date));
        System.out.println("MyBean Executes!");
    }
}
